<?php
/**
 * Description of Core_Registry
 *
 * @author joona
 */
abstract class Core_Registry
{
    //Placeholder for settings
    private static $registry;

    private static $initialized = false;

    private static function init()
    {
        self::$registry = parse_ini_file(
                    dirname(dirname(__FILE__)).'/Config/Application.ini'
        );
        
        self::$initialized = true;
    }

    public static function get($key = null)
    {
        self::$initialized || self::init();
        if(is_null($key))
            return self::$registry;
        else
            return isset(self::$registry[$key]) ? self::$registry[$key] : null;
    }

    public static function reset()
    {
        self::init();
    }
}